package main

import (
	"fmt"
	"io/ioutil"
)

func main() {
	file1Path := "./golang.txt"
	file2Path := "./other.txt"
	data, err := ioutil.ReadFile(file1Path)
	if err != nil {
		fmt.Printf("文件打开失败=%v\n", err)
		return
	}
	err = ioutil.WriteFile(file2Path, data, 0666)
	if err != nil {
		fmt.Printf("文件打开失败=%v\n", err)
	}
}
